package com.pig4cloud.pig.order.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *     订单管理
 * </p>
 * @author 曲营营
 * @since 2025-7-24
 */
@Data
@Schema(description = "订单")
@EqualsAndHashCode(callSuper = true)
public class TrOrder extends Model<TrOrder> {

	private static final long serialVersionUID =1L;

	@TableId(value = "order_id",type = IdType.ASSIGN_ID )
	@Schema(description = "订单id")
	private Long orderId;
	/**
	 * 订单号
	 */
	@NotBlank(message = "订单号不能为空")
	@Schema(description = "订单号")
	private String orderNumber;
	/**
	 * 用户id
	 */
	@NotNull(message = "用户ID不能为空")
	@Schema(description = "用户ID")
	private Integer userId;
	/**
	 * 行程单id
	 */
	@NotNull(message = "行程单ID不能为空")
	@Schema(description = "行程单ID")
	private Integer tripId;
	/**
	 * 客户id
	 */
	@NotNull(message = "客户ID不能为空")
	@Schema(description = "客户ID")
	private Integer cusId;
	/**
	 * 地陪id
	 */
	@NotNull(message = "地陪管理ID不能为空")
	@Schema(description = "地陪ID")
	private Integer guideId;
	/**
	 * 状态
	 */
	@Schema(description = "字典类型")
	private String orStatus;
	/**
	 * 删除标记
	 */
	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "删除标记,1:已删除,0:正常")
	private String delFlag;
	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;
	/**
	 * 更新人
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;
	/**
	 * 创建时间
	 */
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;
	/**
	 * 更新时间
	 */
	@Schema(description = "更新时间")
	@TableField(fill = FieldFill.UPDATE)
	private LocalDateTime updateTime;
	/**
	 * 备注信息
	 */
	@Schema(description = "备注信息")
	private String remark;

	@Schema(description = "订单金额")
	private BigDecimal orderAmount;








}
